home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue55 / Persist / EDSFieldsEditor.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-02-02  |  1.2 KB  |  53 lines

  1. unit EDSFieldsEditor;
  2.  
  3. interface
  4. {
  5. Author     : Guy Smith-Ferrier
  6. Date       : February 2000
  7. Description:
  8. This unit contains the Enhanced basic data set designer and the Enhanced dataset
  9. editor. These classes are used by all dataset components which do not explicitly
  10. set their own Field Editor. As such this means all InterBase Express components
  11. and any custom datasets which inherit from TDataSet. 
  12. }
  13.  
  14. uses
  15.   DSDesign, DsgnIntf, DBReg, DB, StdCtrls;
  16.  
  17. type
  18.   TEDSDesigner = class(TDSDesigner)
  19.   public
  20.     function GetControlClass(Field: TField): string; override;
  21.   end;
  22.  
  23.   TEDataSetEditor = class(TDataSetEditor)
  24.   protected
  25.     function GetDSDesignerClass: TDSDesignerClass; override;
  26.   end;
  27.  
  28.   procedure Register;
  29.  
  30. implementation
  31.  
  32. uses
  33.   EFECommon;
  34.   
  35. function TEDSDesigner.GetControlClass(Field: TField): string;
  36. begin
  37.   Result:=EFEGetControlClass(Field);
  38.   if Result='' then
  39.     Result := inherited GetControlClass(Field)
  40. end;
  41.  
  42. function TEDataSetEditor.GetDSDesignerClass: TDSDesignerClass;
  43. begin
  44.   Result := TEDSDesigner
  45. end;
  46.  
  47. procedure Register;
  48. begin
  49.   RegisterComponentEditor(TDataSet, TEDataSetEditor);
  50. end;
  51.  
  52. end.
  53.